//LoaderPage2.qml
import QtQuick 2.12
 
Item {
    width: 100
    height: 100
    signal message(string msg) //声明信号
 
    Rectangle {
 
        anchors.fill: parent
        color: "blue"
        MouseArea {
            anchors.fill: parent
            onClicked: {
                message("blue Rectangle Clicked")
                console.log("blue Rectangle Clicked")
            }
        }
    }
}